﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
namespace LowLevelGraphics.ImageFormats
{
    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class GCListe<T>
    {
        /// <summary>
        /// Gets the count.
        /// </summary>
        /// <returns></returns>
        public int GetCount()
        {
            return -1;
        }

        /// <summary>
        /// Gets the specified _n index.
        /// </summary>
        /// <param name="_nIndex">Index of the _n.</param>
        /// <returns></returns>
        public string Get(long _nIndex)
        {
            return string.Empty;
        }
    }

    /// <summary>
    /// 
    /// </summary>
    public class Dxf : AbstractImageFormat
    {
        GCListe<char> m_pLayerFilter;

        protected string m_sTextFilter = string.Empty;
        int m_StrichStaerke;
        Rectangle m_Sheet = Rectangle.Empty;

        double m_dMinX;
        double m_dMaxX;
        double m_XOffset;

        double m_dMinY;
        double m_dMaxY;
        double m_YOffset;

        double m_Stretch;

        long m_swFirstDXF;


        /// <summary>
        /// Initializes a new instance of the <see cref="Dxf"/> class.
        /// </summary>
        public Dxf()
        {
        }

        /// <summary>
        /// Gets extension
        /// </summary>
        public override string Extension
        {
            get { return "dxf"; }
        } 

        /// <summary>
        /// activates the layer.
        /// </summary>
        /// <param name="szName">Name of the sz.</param>
        /// <returns></returns>
        long LayerAktiv(string szName)
        {
            if (m_pLayerFilter == null) return 1L;
            else for (long i = 0; i < m_pLayerFilter.GetCount(); i++)
                    if (String.Compare(m_pLayerFilter.Get(i), szName)!=0) return 1L;
            return 0L;
        }

        /// <summary>
        /// Creates the specified _s file name.
        /// </summary>
        /// <param name="_sFileName">Name of the _s file.</param>
        /// <returns></returns>
        public static UnsafeBitmap Create(string _sFileName)
        {
            Rectangle DrawWnd = Rectangle.Empty;

            //GCDXFMfc blub = new dxfFMfc(m_sFileName, pdc, scError, TRUE, 1, rcBounds, -1, NULL, TRUE);
            return null;
        }

        /// <summary>
        /// Save
        /// </summary>
        /// <param name="_sFileName"></param>
        /// <returns></returns>
        public override bool Save(string _sFileName)
        {
            throw new NotImplementedException();
        }
    }
}
